package com.cheng.operation;

import com.cheng.common.exception.CommonException;
import com.cheng.data.entity.DepartmentEntity;
import com.cheng.data.vo.DepartmentVO;
import com.cheng.data.vo.ReqPageInfoVO;
import com.cheng.data.vo.RespPageInfoVO;

import java.util.List;

/**
 * @author: ChengJW
 * @date: 2021/11/10 8:50
 * @version: 1.0
 * @description: 有关 department 的逻辑操作
 */
public interface DepartmentOperation{

    /**
    * @author: ChengJW
    * @params: []
    * @return: com.cheng.data.vo.RespPageInfoVO
    * @date: 2021/11/11
    * @description: 部门信息列表查询，并返回 web 端，需要统一的格式封装
    */
    RespPageInfoVO selectDepartmentInfoList(ReqPageInfoVO vo) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [departmentVO]
    * @return: com.cheng.data.vo.DepartmentVO
    * @date: 2021/11/11
    * @description: 当前登录用户能够查询到的部门编号最大的一条部门信息
    */
    DepartmentVO initAddDepartmentInfo(DepartmentVO departmentVO) throws CommonException;

    /**
     * @author: ChengJW
     * @params: []
     * @return: int
     * @date: 2021/11/11
     * @description: 新增部门信息
     */
    int insertDepartmentInfo(DepartmentVO departmentVO) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [departmentVO]
    * @return: int
    * @date: 2021/11/12
    * @description: 修改部门信息
    */
    int updateDeapartmentInfo(DepartmentVO departmentVO) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [departmentVO]
    * @return: int
    * @date: 2021/11/12
    * @description: 删除部门信息
    */
    int  deleteDepartmentInfo(DepartmentVO departmentVO) throws CommonException;
}
